#ifndef SRC_S2E_PLUGINS_PYTHON_EXCEPTIONS_H_
#define SRC_S2E_PLUGINS_PYTHON_EXCEPTIONS_H_

#include <exception>
#include <string>
#include "xtypes.h"

namespace s2e {
  namespace exceptions {
    class Exception : public std::exception {
      protected:
        std::string message;

      public:
        Exception(const char* message) {
          this->message = std::string(message);
        };
        Exception(const std::string& message) {
          this->message = message;
        };
        virtual ~Exception() throw() {
        };
        const char* what() const throw () {
          return this->message.c_str();
        };
    };

    class Bindings : public s2e::exceptions::Exception {
      public:
        Bindings(const char* message) : s2e::exceptions::Exception(message) {};
        Bindings(const std::string& message) : s2e::exceptions::Exception(message) {};
    };


    class Callbacks : public s2e::exceptions::Exception {
      public:
        Callbacks(const char* message) : s2e::exceptions::Exception(message) {};
        Callbacks(const std::string& message) : s2e::exceptions::Exception(message) {};
    };

    class PyCallbacks : public s2e::exceptions::Exception {
    public:
      PyCallbacks() : s2e::exceptions::Exception("exception info is stored in python state") {};
    };

  };
};



#endif /* SRC_S2E_PLUGINS_PYTHON_EXCEPTIONS_H_ */
